<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Design Saver v0.1</title>


	
</head>
<?php
include_once('xpform_v2.0.php');
$xpform = new xpform("",false);

include_once('../dc2/dc2_class.php');
$dc2 = new dc2(); 

echo"<body style=\"font-family:tahoma;font-size:10px;margin-top:0;background: #EAE8E4 no-repeat fixed left top;\">";
include("../../include/connect.php");
//include('include/style.php3');

if($element_type == "xp_treeview")
{
	if($action_type == "load_variable")
	{

		if($clear_elements)
		{
			echo "\n<script language=\"JavaScript\">parent.document.getElementById('". $item_name ."').innerHTML = \"\";</script>\n";
		}
		$allvariableinfo = $dc2->GetAllVariableInfo("","",$aggregat_id,$device_id);
		
		$allvariableinfo_count = count($allvariableinfo);
		for($i=0;$i<$allvariableinfo_count;$i++)
		{	
			$tree_element = $xpform->get_xp_treeview_add_node_item($i,$id,$allvariableinfo[$i]["aggregat_variable_icon_16"]." ".$allvariableinfo[$i]["aggregat_variable_event_icon_16"]." <font class='". $variable_font_class ."'>". $allvariableinfo[$i]["aggregat_variable_name"] ."</font> (". $allvariableinfo[$i]["aggregat_name"] .")",'',$level,$base_dir,false,'',false);
			
			$tree_element = str_replace(array("\rn", "\n", "\r"), '', $tree_element);
			$tree_element = addslashes($tree_element);
			
			//echo "\n<script language=\"JavaScript\">parent.document.getElementById('". $item_name ."').innerHTML = parent.document.getElementById('". $item_name ."').innerHTML + \"". str_replace(array("\rn", "\n", "\r"), '', $tree_element) ."\";</script>\n";
			echo "\n<script language=\"JavaScript\">parent.document.getElementById('". $item_name ."').innerHTML = parent.document.getElementById('". $item_name ."').innerHTML + \"". $tree_element ."\";</script>\n";
		}
		
	}
	/*
	for($i=500; $i<520; $i++)
	{
		$tree_element = $xpform->get_xp_treeview_add_node_item($i,$id,"TEST ".$i,'',$level,$base_dir,false,'',false);
		echo "\n<script language=\"JavaScript\">parent.document.getElementById('". $item_name ."').innerHTML = parent.document.getElementById('". $item_name ."').innerHTML + \"". str_replace(array("\rn", "\n", "\r"), '', $tree_element) ."\";</script>\n";
	
	}
	*/
}
echo "\n<script language=\"JavaScript\">parent.document.images.xpform_preload_image.style.display = 'none';</script>\n";


/*
$tree_element = $xpform->get_xp_treeview_add_node_item($i,$id,"TEST ".$i,'',$level,$base_dir,false,'',false);
echo $tree_element;
echo "<script language=\"JavaScript\">parent.dynloader_refresh_item(false, '". $item_name ."',". $tree_element .") ;</script>";
*/
//echo "<script language=\"JavaScript\">parent.document.getElementById('xptree_server_tree_device_device_95_content_device_tree_main_95_variablen').innerHTML = \"<img name='xptree_device_tree_main_95_variablen_button_519' src='../../tools/xpform/xpform.image/xptreeview/xpdefault/expandbtn.gif' border='0' width='9' height='9' >TEST 519<br><div id='xptree_device_tree_main_95_variablen_content_519' class='menue_item_main' style='display:none;'></div>\";</script>";
	//echo "<script language=\"JavaScript\">parent.document.getElementById('". $item_name ."').innerHTML = parent.document.getElementById('". $item_name ."').innerHTML + \"	<img name='xptree_device_tree_main_3_variablen_button_500' src='../../tools/xpform/xpform.image/xptreeview/xpdefault/expandbtn.gif' border='0' width='9' height='9' > TEST 500<br><div id='xptree_device_tree_main_3_variablen_content_500' class='menue_item_main' style='display:none;'></div>\";</script>";
	//echo "<script language=\"JavaScript\">parent.document.getElementById('". $item_name ."').innerHTML = parent.document.getElementById('". $item_name ."').innerHTML + \"<img name='xptree_device_tree_main_95_variablen_button_500' src='../../tools/xpform/xpform.image/xptreeview/xpdefault/expandbtn.gif' border='0' width='9' height='9' >TEST 500<br><div id='xptree_device_tree_main_95_variablen_content_500' class='menue_item_main' style='display:none;'></div>\";</script>";


?>

</body>
<script language="JavaScript">
//alert('mein anzuzeigender Text');
//parent.frames[0].alert('mein anzuzeigender Text');
//parent.document.getElementById('<?phpecho $item_name; ?>').innerHTML = "fsdjklf";
</script>
</html>
